import { copy } from '@/utils/util';
export default {
  bind(el, binding, vnode) {
    el.style.cursor = 'pointer';
    el.handler = () => {
      let id = el.getAttribute("id");
      let msg = el.getAttribute("msg") ?? '';
      copy("#" + id, vnode.context, msg)
    };
    el.addEventListener('click', el.handler);
  },
  unbind(el) {
    el.removeEventListener('click', el.handler);
  }
}
